home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CreatingGames / Utilities / Misc / GMS / GMSDev / Includes / input / joyports.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-11-30  |  1.5 KB  |  53 lines

  1. #ifndef INPUT_JOYPORTS_H
  2. #define INPUT_JOYPORTS_H TRUE
  3.  
  4. /*
  5. **  $VER: joyports.h V0.9B
  6. **
  7. **  Joyport definitions.
  8. **
  9. **  (C) Copyright 1996-1997 DreamWorld Productions.
  10. **      All Rights Reserved.
  11. */
  12.  
  13. #ifndef DPKERNEL_H
  14. #include <dpkernel/dpkernel.h>
  15. #endif
  16.  
  17. /*****************************************************************************
  18. ** JoyData structure, for reading from joyports.
  19. */
  20.  
  21. #define JOYVERSION   1
  22. #define TAGS_JOYDATA ((ID_SPCTAGS<<16)|(ID_JOYDATA))
  23.  
  24. struct JoyData {
  25.   struct Head Head;   /* Standard header */
  26.   WORD   Port;        /* Port number, starts at 0 (mouse) */
  27.   WORD   XChange;     /* Change from X position */
  28.   WORD   YChange;     /* Change from Y position */
  29.   WORD   ZChange;     /* Change from Z position */
  30.   LONG   Buttons;     /* Currently pressed buttons */
  31.  
  32.   /*** Private fields start now ***/
  33.  
  34.   LONG   prvTicks;    /* Time-Out */
  35.   WORD   prvType;     /* Type of device */
  36. };
  37.  
  38. #define JD_FIRE1  0x00000001L  /* Standard Fire Button (1) - LMB */
  39. #define JD_FIRE2  0x00000002L  /* Standard Fire Button (2) - RMB */
  40. #define JD_FIRE3  0x00000004L  /* Standard Fire Button (3) - MMB */
  41. #define JD_FIRE4  0x00000008L  /* "Start"    */
  42. #define JD_FIRE5  0x00000010L  /* "Select"   */
  43. #define JD_FIRE6  0x00000020L  /* Rewind  L1 */
  44. #define JD_FIRE7  0x00000040L  /* Forward R1 */
  45. #define JD_FIRE8  0x00000080L  /* Rewind  L2 */
  46. #define JD_FIRE9  0x00000100L  /* Forward R2 */
  47.  
  48. #define JD_LMB    JD_FIRE1
  49. #define JD_RMB    JD_FIRE2
  50. #define JD_MMB    JD_FIRE3
  51.  
  52. #endif /* INPUT_JOYPORTS_H */
  53.